package com.common.lang;

/**
 * 
 * @author caijianchao
 * @date 2020年4月28日
 * SplitTest.java
 */
public class SplitTest2 {
	
	public static String hebei ="20181105|530000000|P01|105731000004832 |中国石油天然气股份有限公司云南销售分公司 |105910200040895 |1057310000048320001|10342000000000000000001 |云南中石油清算户 |530085036|JTHYYY |\r\n" + 
			" | | | |CN000|05-NOV-18 02.37.27.404516 PM | 1| | | |";
	public static String yunnan ="20200224|130000000|P01|105000051721637 |中国石油天然气股份有限公司河北销售分公司 |105910200079360 |1057310000013000001|034201300000000100003 |中石油联名卡(河北) |130618801|JTHYYY |\r\n" + 
			" | | | |CN000|05-NOV-18 02.37.27.404516 PM | 1| | | |";

	public static String col =" OPRGDAY_PRD CHAR(8)\r\n" + 
			" LV1_BR_NO NOT NULL CHAR(9)\r\n" + 
			" IDPY_CST_TPCD NOT NULL CHAR(3)\r\n" + 
			" MRCH_ID VARCHAR2(21)\r\n" + 
			" MRCH_NM VARCHAR2(600)\r\n" + 
			" PREFTL_MRCH_ID VARCHAR2(21)\r\n" + 
			" TMNL_ID CHAR(19)\r\n" + 
			" AR_ACCNO VARCHAR2(32)\r\n" + 
			" AR_ACCNM VARCHAR2(240)\r\n" + 
			" LDGR_INSID CHAR(9)\r\n" + 
			" GNLLDGR_SRC_ID VARCHAR2(10)\r\n" + 
			" RMRK VARCHAR2(600)\r\n" + 
			" RMRK_1 VARCHAR2(3000)\r\n" + 
			" TXN_LCL_DT CHAR(8)\r\n" + 
			" TXN_LCL_TM CHAR(6)\r\n" + 
			" STM_DT CHAR(8)\r\n" + 
			" STM_TM CHAR(6)\r\n" + 
			" MULTI_TENANCY_ID NOT NULL CHAR(5)\r\n" + 
			" TMS TIMESTAMP(6)\r\n" + 
			" VNO NUMBER(9)\r\n" + 
			" TXN_ITT_CHNL_ID CHAR(23)\r\n" + 
			" TXN_ITT_CHNL_CGY_CODE CHAR(8)\r\n" + 
			" DAC_VERF CHAR(16)\r\n" + 
			" RSRV_FLD_DSC CLOB";
	public static void main(String[] args) {
		
		String[] split = hebei.split("\\|");
		String[] split2 = yunnan.split("\\|");
		int length = split.length > split2.length? split2.length: split.length;
		String[] split3 = col.split("\\r\\n");
		System.out.println(length);
		System.out.println("不同的字段 \t河北行\t云南行");
		for (int i = 0; i < length; i++) {
			if(split[i].equals(split2[i])) {
				
			}else {
				System.out.println(split3[i].split(" ")[1] +"\t"+split[i]+"\t"+split2[i]);
			}
		}
	}
}
